//
//  HESysMsgModel.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/12/23.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HESysMsgModel.h"

@implementation HESysMsgModel

-(NSString *)Ksystem_typeName {
    if (!_Ksystem_typeName) {
        _Ksystem_typeName = [HEEnums sysInfoTypeToText: _system_type];
    }
    return _Ksystem_typeName;
}

- (NSString *)Kcreate_date {
    if (!_Kcreate_date) {
        _Kcreate_date = [NSDate inputTimeStr:[NSDate timestampToDate:_create_date formaterMode:NSDateFormaterModeDefault]];
    }
    return _Kcreate_date;
}

- (HESysInfoType)sysType {
    _sysType = [HEEnums sysInfoTypeToEnum:_system_type];
    return _sysType;
}

- (id)params {
    if (!_params) {
        switch (self.sysType) {
            case HESysInfoTypeADD_NUM:
            {
                _params = [HEOrderModel mj_objectWithKeyValues:[_system_param mj_JSONObject]];
            }
                break;
            case HESysInfoTypeACTIVITY:
            {
                HEActiveModel *model = [HEActiveModel mj_objectWithKeyValues:[_system_param mj_JSONObject]];
                model.active_name = _system_title;
                model.showRead = !_is_read;
                model.msg_id = _id;
                _params = model;
            }
                break;
            case HESysInfoTypeProxyPay:
            {
                _params = [HEProxyPayInfoModel mj_objectWithKeyValues:[_system_param mj_JSONObject]];
            }
                break;
            default:
                break;
        }
        
    }
    return _params;
}

@end


@implementation HEProxyPayInfoModel


@end
